package com.xiao.community.dao;

import com.xiao.community.entity.OrderEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 
 * 
 * @author 韩国涛
 * @email 18862701405@gmail.com
 * @date 2021-09-10 15:22:54
 */
@Mapper
public interface OrderDao extends BaseMapper<OrderEntity> {

    @Select("select count(*) from orders where order_id=#{orderId}")
    Integer selectByNum(@Param("orderId") String orderId);

    @Update("update orders set ifstart=#{orderEntity.ifstart} where order_id=#{orderEntity.orderId}")
    void updateByOrderIfStart(@Param("orderEntity") OrderEntity orderEntity);
}
